<?php get_header(); ?>

<div id="body-container">
	<div id="latest-entry">

 <?php if (have_posts()) : ?>
               <?php while (have_posts()) : the_post(); update_post_caches($posts); ?>

<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
		<span class="date"><?php the_time('F jS, Y') ?></span>
		<p class="categories">Filed Under: <?php the_category(', ') ?> with <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></p>
		
		<?php the_excerpt('Read the rest of this entry &raquo;'); ?>



<?php endwhile; ?>
		
		<p class="postnav"><span class="left"><?php posts_nav_link('&larr; ','Previous Page ','') ?></span><span class="right2"><?php posts_nav_link('&rarr; ','','Next Page') ?> </span></p>


			<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Your search returned no results. <a href="<?php echo get_settings('home'); ?>">Return to the homepage</a> or try a different search.</p>
		
	<?php endif; ?>
	

	</div>

<div id="sidebarwrap">
	<div id="intro">
	<?php
	  global $user_ID, $user_identity;
	  get_currentuserinfo();
	  if ($user_ID) :
	?>
		<span class="user">Login as: <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><strong><?php echo $user_identity; ?></strong></a> 
		[<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout">Logout</a>]</span>
	<?php else : ?>
		<span class="user"><a href="<?php echo get_settings('home'); ?>/wp-login.php">Login</a></span>
	<?php endif; ?>	

		<?php include (TEMPLATEPATH . '/intro.php'); ?>
		<div class="clear"></div>
	</div><!-- /intro -->

	<?php include (TEMPLATEPATH . '/searchform.php'); ?>
	<?php include (TEMPLATEPATH . '/sidebar3.php'); ?>
	<?php get_sidebar(); ?>
	<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
</div>

<?php get_footer(); ?>
